/*
 * DotWriter.h
 *
 *  Created on: 19/11/2013
 *      Author: asc
 */

#ifndef DOTWRITER_H_
#define DOTWRITER_H_

#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <map>

#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>

using namespace std;
using namespace boost::algorithm;

namespace DotWriter
{

	/*
	 *
	 */
	typedef struct Nodo
	{
			string revision;
			string author;
			string timestamp;
			string antecesor;
			string files;
	}Nodo;

const string header =
"digraph \"Hystory\"{\n\
charset=\"utf-8\"\n";

const string typeNode = " [shape=\"record\", label=\"{";
const string relation = "[arrowtail=\"none\", arrowhead=\"empty\"];";

	class DotWriter
	{
		friend ostream& operator<<(ostream& , const DotWriter);

		public:
			DotWriter();
			~DotWriter();
			void addNodo(Nodo x);
			vector<Nodo> getGraph()const;
		private:
			vector<Nodo> graph;
	};

} /* namespace DotWriter */
#endif /* DOTWRITER_H_ */
